import request from '@/request'
const URL = process.env.VUE_APP_API

// 新增-编辑
export function menuAdd(data) {
  return request({
    url: `${URL}/manage/upms/permission/add`,
    method: 'post',
    data
  })
}

// 查看
export function menuInfo(params) {
  return request({
    url: `${URL}/manage/upms/permission/info`,
    method: 'get',
    params
  })
}

// 禁用-启用
export function menuLock(params) {
  return request({
    url: `${URL}/manage/upms/permission/lock`,
    method: 'post',
    params
  })
}

// 删除
export function menuDelete({ id, isSystem }) {
  return request({
    url: `${URL}/manage/upms/permission/delete?id=${id}&isSystem=${isSystem}`,
    method: 'get'
  })
}
